//
//  UserAccount.m
//  Fireball
//
//  Created by 俞渊华 on 2017/12/8.
//  Copyright © 2017年 俞渊华. All rights reserved.
//

#import "UserAccount.h"

@implementation UserAccount
static id _instance;
+ (instancetype)sharedInstance{
    
    static dispatch_once_t onceToken;
    dispatch_once(&onceToken, ^{
        _instance = [[self alloc] init];
    });
    return _instance;
}

+ (instancetype)allocWithZone:(struct _NSZone *)zone{
    
    static dispatch_once_t onceToken;
    dispatch_once(&onceToken, ^{
        _instance = [super allocWithZone:zone];
    });
    return _instance;
}

- (id)copyWithZone:(NSZone *)zone{
    return _instance;
}
- (id)mutableCopyWithZone:(NSZone *)zone {
    return _instance;
}


//如果需要指定“唯一约束”字段,就实现该函数,这里指定 userId 为“唯一约束”.
+(NSString *)bg_uniqueKey{
    return @"UserId";
}



@end
